@tailwind base;
@tailwind components;
@tailwind utilities;

/* 全局样式重置和基础配置 - 现代化科技风格 */
html,
body {
	height: 100%;
	margin: 0;
	padding: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #f1f5f9 100%);
	background-attachment: fixed;
	overflow-x: hidden;
}

/* 添加微妙的背景纹理 */
body::before {
	content: "";
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: radial-gradient(circle at 25% 25%, rgba(148, 163, 184, 0.03) 0%, transparent 50%),
		radial-gradient(circle at 75% 75%, rgba(148, 163, 184, 0.02) 0%, transparent 50%);
	pointer-events: none;
	z-index: -1;
}

/* 滚动条样式优化 - 现代化设计 */
::-webkit-scrollbar {
	width: 8px;
	height: 8px;
}

::-webkit-scrollbar-track {
	background: rgba(148, 163, 184, 0.1);
	border-radius: 4px;
}

::-webkit-scrollbar-thumb {
	background: #cbd5e1;
	border-radius: 4px;
	transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
	background: #94a3b8;
}

/* 微信公众号文章样式模拟 */
.wechat-article {
	font-family: -apple-system-font, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei",
		Arial, sans-serif;
	font-size: 17px;
	line-height: 1.6;
	color: #3e3e3e;
	background-color: #fff;
	padding: 20px;
	max-width: 100%;
	word-wrap: break-word;
}

.wechat-article h1 {
	font-size: 24px;
	font-weight: bold;
	line-height: 1.4;
	margin: 20px 0 15px 0;
	color: #2c2c2c;
}

.wechat-article h2 {
	font-size: 20px;
	font-weight: bold;
	line-height: 1.4;
	margin: 18px 0 12px 0;
	color: #2c2c2c;
}

.wechat-article h3 {
	font-size: 18px;
	font-weight: bold;
	line-height: 1.4;
	margin: 16px 0 10px 0;
	color: #2c2c2c;
}

.wechat-article p {
	margin: 10px 0;
	text-indent: 2em;
}

.wechat-article blockquote {
	border-left: 4px solid #d0d0d0;
	padding-left: 16px;
	margin: 16px 0;
	color: #666;
	font-style: italic;
}

.wechat-article strong {
	font-weight: bold;
	color: #2c2c2c;
}

.wechat-article em {
	font-style: italic;
	color: #666;
}

/* 响应式设计 */
@media (max-width: 768px) {
	.wechat-article {
		padding: 16px;
		font-size: 16px;
	}
}

/* 代码高亮样式 */
.hljs {
	background: #f8f9fa !important;
	color: #24292e !important;
	padding: 1rem !important;
	border-radius: 8px !important;
	border: 1px solid #e1e4e8 !important;
	font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace !important;
	font-size: 0.85rem !important;
	line-height: 1.5 !important;
	overflow-x: auto !important;
}

.hljs-comment,
.hljs-quote {
	color: #6a737d !important;
	font-style: italic !important;
}

.hljs-keyword,
.hljs-selector-tag,
.hljs-subst {
	color: #d73a49 !important;
	font-weight: bold !important;
}

.hljs-number,
.hljs-literal,
.hljs-variable,
.hljs-template-variable,
.hljs-tag .hljs-attr {
	color: #005cc5 !important;
}

.hljs-string,
.hljs-doctag {
	color: #032f62 !important;
}

.hljs-title,
.hljs-section,
.hljs-selector-id {
	color: #6f42c1 !important;
	font-weight: bold !important;
}

.hljs-subst {
	font-weight: normal !important;
}

.hljs-type,
.hljs-class .hljs-title {
	color: #d73a49 !important;
	font-weight: bold !important;
}

.hljs-tag,
.hljs-name,
.hljs-attribute {
	color: #22863a !important;
	font-weight: normal !important;
}

.hljs-regexp,
.hljs-link {
	color: #032f62 !important;
}

.hljs-symbol,
.hljs-bullet {
	color: #e36209 !important;
}

.hljs-built_in,
.hljs-builtin-name {
	color: #005cc5 !important;
}

.hljs-meta {
	color: #6a737d !important;
}

.hljs-deletion {
	background: #ffeef0 !important;
}

.hljs-addition {
	background: #f0fff4 !important;
}

.hljs-emphasis {
	font-style: italic !important;
}

.hljs-strong {
	font-weight: bold !important;
}

/* 行内代码样式 */
code:not(.hljs) {
	background: #f1f3f4 !important;
	color: #d73a49 !important;
	padding: 0.2em 0.4em !important;
	border-radius: 4px !important;
	font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace !important;
	font-size: 0.85em !important;
	border: 1px solid #e1e4e8 !important;
}

@layer utilities {
	.text-balance {
		text-wrap: balance;
	}
}
